package com.example.demo.dat;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @program: demo
 * @description:
 * @author: zt22328 赵儒定
 * @create: 2022-06-22 09:51
 **/
public class DatTest {
    public static void main(String[] args) throws IOException{

        List<String> words = new ArrayList<String>();
        words.add("一举成名天下知");
        words.add("一举成名");


        words.add("天下知");

        DoubleArrayTrie dat = new DoubleArrayTrie();
        System.out.println("是否错误: " + dat.build(words));
        System.out.println(dat);

//        List<Integer> integerList = dat.commonPrefixSearch("一举成名天下知");
//        for (int index : integerList)
//        {
//            System.out.println(words.get(index));
//        }
    }




}
